{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 165,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import keras as ks"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 166,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sklearn"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 223,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.metrics import accuracy_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 167,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.model_selection import train_test_split "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 168,
   "metadata": {},
   "outputs": [],
   "source": [
    "from keras.models import Sequential\n",
    "from keras.layers import Dense, Activation, Embedding, LSTM,Dropout"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 169,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.preprocessing import StandardScaler"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 170,
   "metadata": {},
   "outputs": [],
   "source": [
    "from keras.wrappers.scikit_learn import KerasClassifier"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 171,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.pipeline import Pipeline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 172,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.model_selection import StratifiedKFold"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 173,
   "metadata": {},
   "outputs": [],
   "source": [
    "from keras.models import Sequential\n",
    "from keras.layers import Dense\n",
    "from keras.wrappers.scikit_learn import KerasClassifier\n",
    "from sklearn.model_selection import cross_val_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 174,
   "metadata": {},
   "outputs": [],
   "source": [
    "x=['HR', 'O2Sat', 'Temp', 'SBP', 'MAP', 'DBP', 'Resp', 'EtCO2',\n",
    "       'BaseExcess', 'HCO3', 'FiO2', 'pH', 'PaCO2', 'SaO2', 'AST', 'BUN',\n",
    "       'Alkalinephos', 'Calcium', 'Chloride', 'Creatinine', 'Bilirubin_direct',\n",
    "       'Glucose', 'Lactate', 'Magnesium', 'Phosphate', 'Potassium',\n",
    "       'Bilirubin_total', 'TroponinI', 'Hct', 'Hgb', 'PTT', 'WBC',\n",
    "       'Fibrinogen', 'Platelets', 'Age', 'Gender', 'Unit1', 'Unit2',\n",
    "       'HospAdmTime', 'ICULOS']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 175,
   "metadata": {},
   "outputs": [],
   "source": [
    " def create_larger():\n",
    "        model = Sequential()\n",
    "        model.add(Dense(40, activation='relu'))\n",
    "        model.add(Dropout(0.5))\n",
    "        \n",
    "        model.add(Dense(1, activation='sigmoid'))\n",
    "        model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])\n",
    "        return model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 176,
   "metadata": {},
   "outputs": [],
   "source": [
    "estimators = []\n",
    "estimators.append(('standardize', StandardScaler()))\n",
    "estimators.append(('mlp', KerasClassifier(build_fn=create_larger, epochs=100, batch_size=5, verbose=0)))\n",
    "pipeline = Pipeline(estimators)\n",
    "kfold = StratifiedKFold(n_splits=10, shuffle=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 177,
   "metadata": {},
   "outputs": [],
   "source": [
    "model=create_larger()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 178,
   "metadata": {},
   "outputs": [],
   "source": [
    "data=pd.read_csv('./SetB/setB.csv')\n",
    "\n",
    "\n",
    "data=data.fillna(data.mean())\n",
    "\n",
    "X=data[x].copy()\n",
    "y=data['SepsisLabel'].copy()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 151,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>HR</th>\n",
       "      <th>O2Sat</th>\n",
       "      <th>Temp</th>\n",
       "      <th>SBP</th>\n",
       "      <th>MAP</th>\n",
       "      <th>DBP</th>\n",
       "      <th>Resp</th>\n",
       "      <th>EtCO2</th>\n",
       "      <th>BaseExcess</th>\n",
       "      <th>...</th>\n",
       "      <th>WBC</th>\n",
       "      <th>Fibrinogen</th>\n",
       "      <th>Platelets</th>\n",
       "      <th>Age</th>\n",
       "      <th>Gender</th>\n",
       "      <th>Unit1</th>\n",
       "      <th>Unit2</th>\n",
       "      <th>HospAdmTime</th>\n",
       "      <th>ICULOS</th>\n",
       "      <th>SepsisLabel</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>84.229116</td>\n",
       "      <td>97.169618</td>\n",
       "      <td>36.924696</td>\n",
       "      <td>126.500634</td>\n",
       "      <td>86.234004</td>\n",
       "      <td>66.102029</td>\n",
       "      <td>18.626825</td>\n",
       "      <td>33.011315</td>\n",
       "      <td>-2.617524</td>\n",
       "      <td>...</td>\n",
       "      <td>10.731054</td>\n",
       "      <td>277.257529</td>\n",
       "      <td>191.907208</td>\n",
       "      <td>73</td>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>-214.64</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>93.000000</td>\n",
       "      <td>92.500000</td>\n",
       "      <td>36.924696</td>\n",
       "      <td>110.000000</td>\n",
       "      <td>76.000000</td>\n",
       "      <td>56.000000</td>\n",
       "      <td>22.000000</td>\n",
       "      <td>33.011315</td>\n",
       "      <td>-2.617524</td>\n",
       "      <td>...</td>\n",
       "      <td>10.731054</td>\n",
       "      <td>277.257529</td>\n",
       "      <td>191.907208</td>\n",
       "      <td>73</td>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>-214.64</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>91.000000</td>\n",
       "      <td>96.000000</td>\n",
       "      <td>36.924696</td>\n",
       "      <td>108.000000</td>\n",
       "      <td>84.500000</td>\n",
       "      <td>72.000000</td>\n",
       "      <td>23.500000</td>\n",
       "      <td>33.011315</td>\n",
       "      <td>-2.617524</td>\n",
       "      <td>...</td>\n",
       "      <td>10.731054</td>\n",
       "      <td>277.257529</td>\n",
       "      <td>191.907208</td>\n",
       "      <td>73</td>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>-214.64</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>93.000000</td>\n",
       "      <td>98.000000</td>\n",
       "      <td>36.924696</td>\n",
       "      <td>123.000000</td>\n",
       "      <td>87.000000</td>\n",
       "      <td>61.000000</td>\n",
       "      <td>21.000000</td>\n",
       "      <td>33.011315</td>\n",
       "      <td>-2.617524</td>\n",
       "      <td>...</td>\n",
       "      <td>10.731054</td>\n",
       "      <td>277.257529</td>\n",
       "      <td>191.907208</td>\n",
       "      <td>73</td>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>-214.64</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>93.000000</td>\n",
       "      <td>95.000000</td>\n",
       "      <td>36.924696</td>\n",
       "      <td>110.000000</td>\n",
       "      <td>81.000000</td>\n",
       "      <td>70.000000</td>\n",
       "      <td>20.000000</td>\n",
       "      <td>33.011315</td>\n",
       "      <td>-2.617524</td>\n",
       "      <td>...</td>\n",
       "      <td>10.731054</td>\n",
       "      <td>277.257529</td>\n",
       "      <td>191.907208</td>\n",
       "      <td>73</td>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>-214.64</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>641990</td>\n",
       "      <td>24</td>\n",
       "      <td>74.000000</td>\n",
       "      <td>97.000000</td>\n",
       "      <td>36.924696</td>\n",
       "      <td>113.000000</td>\n",
       "      <td>83.000000</td>\n",
       "      <td>63.000000</td>\n",
       "      <td>18.000000</td>\n",
       "      <td>33.011315</td>\n",
       "      <td>-2.617524</td>\n",
       "      <td>...</td>\n",
       "      <td>10.731054</td>\n",
       "      <td>277.257529</td>\n",
       "      <td>191.907208</td>\n",
       "      <td>62</td>\n",
       "      <td>0</td>\n",
       "      <td>0.486934</td>\n",
       "      <td>0.513066</td>\n",
       "      <td>0.00</td>\n",
       "      <td>25</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>641991</td>\n",
       "      <td>25</td>\n",
       "      <td>72.000000</td>\n",
       "      <td>98.000000</td>\n",
       "      <td>36.600000</td>\n",
       "      <td>116.000000</td>\n",
       "      <td>88.000000</td>\n",
       "      <td>68.000000</td>\n",
       "      <td>16.000000</td>\n",
       "      <td>33.011315</td>\n",
       "      <td>-2.617524</td>\n",
       "      <td>...</td>\n",
       "      <td>10.731054</td>\n",
       "      <td>277.257529</td>\n",
       "      <td>191.907208</td>\n",
       "      <td>62</td>\n",
       "      <td>0</td>\n",
       "      <td>0.486934</td>\n",
       "      <td>0.513066</td>\n",
       "      <td>0.00</td>\n",
       "      <td>26</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>641992</td>\n",
       "      <td>26</td>\n",
       "      <td>74.000000</td>\n",
       "      <td>98.000000</td>\n",
       "      <td>36.924696</td>\n",
       "      <td>118.000000</td>\n",
       "      <td>88.000000</td>\n",
       "      <td>72.000000</td>\n",
       "      <td>18.000000</td>\n",
       "      <td>33.011315</td>\n",
       "      <td>-2.617524</td>\n",
       "      <td>...</td>\n",
       "      <td>10.731054</td>\n",
       "      <td>277.257529</td>\n",
       "      <td>191.907208</td>\n",
       "      <td>62</td>\n",
       "      <td>0</td>\n",
       "      <td>0.486934</td>\n",
       "      <td>0.513066</td>\n",
       "      <td>0.00</td>\n",
       "      <td>27</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>641993</td>\n",
       "      <td>27</td>\n",
       "      <td>82.000000</td>\n",
       "      <td>97.000000</td>\n",
       "      <td>36.924696</td>\n",
       "      <td>120.000000</td>\n",
       "      <td>82.000000</td>\n",
       "      <td>66.000000</td>\n",
       "      <td>16.000000</td>\n",
       "      <td>33.011315</td>\n",
       "      <td>-2.617524</td>\n",
       "      <td>...</td>\n",
       "      <td>10.731054</td>\n",
       "      <td>277.257529</td>\n",
       "      <td>191.907208</td>\n",
       "      <td>62</td>\n",
       "      <td>0</td>\n",
       "      <td>0.486934</td>\n",
       "      <td>0.513066</td>\n",
       "      <td>0.00</td>\n",
       "      <td>28</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>641994</td>\n",
       "      <td>28</td>\n",
       "      <td>86.000000</td>\n",
       "      <td>97.000000</td>\n",
       "      <td>36.924696</td>\n",
       "      <td>123.000000</td>\n",
       "      <td>89.000000</td>\n",
       "      <td>65.000000</td>\n",
       "      <td>16.000000</td>\n",
       "      <td>33.011315</td>\n",
       "      <td>-2.617524</td>\n",
       "      <td>...</td>\n",
       "      <td>10.731054</td>\n",
       "      <td>277.257529</td>\n",
       "      <td>191.907208</td>\n",
       "      <td>62</td>\n",
       "      <td>0</td>\n",
       "      <td>0.486934</td>\n",
       "      <td>0.513066</td>\n",
       "      <td>0.00</td>\n",
       "      <td>29</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>641995 rows × 42 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        Unnamed: 0         HR      O2Sat       Temp         SBP        MAP  \\\n",
       "0                0  84.229116  97.169618  36.924696  126.500634  86.234004   \n",
       "1                1  93.000000  92.500000  36.924696  110.000000  76.000000   \n",
       "2                2  91.000000  96.000000  36.924696  108.000000  84.500000   \n",
       "3                3  93.000000  98.000000  36.924696  123.000000  87.000000   \n",
       "4                4  93.000000  95.000000  36.924696  110.000000  81.000000   \n",
       "...            ...        ...        ...        ...         ...        ...   \n",
       "641990          24  74.000000  97.000000  36.924696  113.000000  83.000000   \n",
       "641991          25  72.000000  98.000000  36.600000  116.000000  88.000000   \n",
       "641992          26  74.000000  98.000000  36.924696  118.000000  88.000000   \n",
       "641993          27  82.000000  97.000000  36.924696  120.000000  82.000000   \n",
       "641994          28  86.000000  97.000000  36.924696  123.000000  89.000000   \n",
       "\n",
       "              DBP       Resp      EtCO2  BaseExcess  ...        WBC  \\\n",
       "0       66.102029  18.626825  33.011315   -2.617524  ...  10.731054   \n",
       "1       56.000000  22.000000  33.011315   -2.617524  ...  10.731054   \n",
       "2       72.000000  23.500000  33.011315   -2.617524  ...  10.731054   \n",
       "3       61.000000  21.000000  33.011315   -2.617524  ...  10.731054   \n",
       "4       70.000000  20.000000  33.011315   -2.617524  ...  10.731054   \n",
       "...           ...        ...        ...         ...  ...        ...   \n",
       "641990  63.000000  18.000000  33.011315   -2.617524  ...  10.731054   \n",
       "641991  68.000000  16.000000  33.011315   -2.617524  ...  10.731054   \n",
       "641992  72.000000  18.000000  33.011315   -2.617524  ...  10.731054   \n",
       "641993  66.000000  16.000000  33.011315   -2.617524  ...  10.731054   \n",
       "641994  65.000000  16.000000  33.011315   -2.617524  ...  10.731054   \n",
       "\n",
       "        Fibrinogen   Platelets  Age  Gender     Unit1     Unit2  HospAdmTime  \\\n",
       "0       277.257529  191.907208   73       1  1.000000  0.000000      -214.64   \n",
       "1       277.257529  191.907208   73       1  1.000000  0.000000      -214.64   \n",
       "2       277.257529  191.907208   73       1  1.000000  0.000000      -214.64   \n",
       "3       277.257529  191.907208   73       1  1.000000  0.000000      -214.64   \n",
       "4       277.257529  191.907208   73       1  1.000000  0.000000      -214.64   \n",
       "...            ...         ...  ...     ...       ...       ...          ...   \n",
       "641990  277.257529  191.907208   62       0  0.486934  0.513066         0.00   \n",
       "641991  277.257529  191.907208   62       0  0.486934  0.513066         0.00   \n",
       "641992  277.257529  191.907208   62       0  0.486934  0.513066         0.00   \n",
       "641993  277.257529  191.907208   62       0  0.486934  0.513066         0.00   \n",
       "641994  277.257529  191.907208   62       0  0.486934  0.513066         0.00   \n",
       "\n",
       "        ICULOS  SepsisLabel  \n",
       "0            1            0  \n",
       "1            2            0  \n",
       "2            3            0  \n",
       "3            4            0  \n",
       "4            5            0  \n",
       "...        ...          ...  \n",
       "641990      25            0  \n",
       "641991      26            0  \n",
       "641992      27            0  \n",
       "641993      28            0  \n",
       "641994      29            0  \n",
       "\n",
       "[641995 rows x 42 columns]"
      ]
     },
     "execution_count": 151,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 179,
   "metadata": {},
   "outputs": [],
   "source": [
    "X=X.values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 180,
   "metadata": {},
   "outputs": [],
   "source": [
    "y=y.values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 181,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/2\n",
      "641995/641995 [==============================] - 11s 17us/step - loss: 0.2052 - accuracy: 0.9841\n",
      "Epoch 2/2\n",
      "641995/641995 [==============================] - 10s 15us/step - loss: 0.0764 - accuracy: 0.9858\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<keras.callbacks.callbacks.History at 0x275a311e6c8>"
      ]
     },
     "execution_count": 181,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.fit(X, y,epochs=2,batch_size=128)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 182,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3104/3104 [==============================] - 0s 23us/step\n"
     ]
    }
   ],
   "source": [
    "score = model.evaluate(x_test, y_test, batch_size=128)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 183,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[0.16469352945839008, 0.9623066782951355]"
      ]
     },
     "execution_count": 183,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 184,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_pred=model.predict(x_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 185,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_train=pd.read_csv('./SetA/setA.csv')\n",
    "data_train=data_train.fillna(data.mean())\n",
    "x_test=data_train[x].copy()\n",
    "y_test=data_train['SepsisLabel'].copy()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 186,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_pred=model.predict(x_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 187,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "117"
      ]
     },
     "execution_count": 187,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(y_test[y_test==1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 190,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0.01233387],\n",
       "       [0.01516554],\n",
       "       [0.01369354],\n",
       "       [0.01551035],\n",
       "       [0.01683027],\n",
       "       [0.01795757],\n",
       "       [0.02001849],\n",
       "       [0.0206978 ],\n",
       "       [0.01828837],\n",
       "       [0.0195449 ],\n",
       "       [0.01848328],\n",
       "       [0.0157733 ],\n",
       "       [0.02070719],\n",
       "       [0.02112055],\n",
       "       [0.02192575],\n",
       "       [0.02147263],\n",
       "       [0.01358905],\n",
       "       [0.02389032],\n",
       "       [0.01843682],\n",
       "       [0.02348039],\n",
       "       [0.02471891],\n",
       "       [0.02451628],\n",
       "       [0.02620739],\n",
       "       [0.02537954],\n",
       "       [0.0281007 ],\n",
       "       [0.02642229],\n",
       "       [0.02171662],\n",
       "       [0.02782741],\n",
       "       [0.0301396 ],\n",
       "       [0.02495247],\n",
       "       [0.02406427],\n",
       "       [0.02891532],\n",
       "       [0.02709442],\n",
       "       [0.02772498],\n",
       "       [0.03143945],\n",
       "       [0.03047597],\n",
       "       [0.03341565],\n",
       "       [0.03250542],\n",
       "       [0.02629846],\n",
       "       [0.0258632 ],\n",
       "       [0.03185248],\n",
       "       [0.03273267],\n",
       "       [0.03181612],\n",
       "       [0.02526355],\n",
       "       [0.03244776],\n",
       "       [0.03188348],\n",
       "       [0.03241006],\n",
       "       [0.03124696],\n",
       "       [0.0131523 ],\n",
       "       [0.01258722],\n",
       "       [0.01444858],\n",
       "       [0.01173484],\n",
       "       [0.01454547],\n",
       "       [0.01253849],\n",
       "       [0.01296243],\n",
       "       [0.01428321],\n",
       "       [0.01409295],\n",
       "       [0.02227551],\n",
       "       [0.01342466],\n",
       "       [0.01449749],\n",
       "       [0.01513141],\n",
       "       [0.01520512],\n",
       "       [0.01483315],\n",
       "       [0.01700142],\n",
       "       [0.01669604],\n",
       "       [0.02177602],\n",
       "       [0.02521667],\n",
       "       [0.02804321],\n",
       "       [0.02532774],\n",
       "       [0.02583882],\n",
       "       [0.0146741 ],\n",
       "       [0.02344942],\n",
       "       [0.02494922],\n",
       "       [0.02612978],\n",
       "       [0.02756366],\n",
       "       [0.01628947],\n",
       "       [0.02679831],\n",
       "       [0.027704  ],\n",
       "       [0.02573302],\n",
       "       [0.02647534],\n",
       "       [0.0271948 ],\n",
       "       [0.02607781],\n",
       "       [0.02805355],\n",
       "       [0.02739802],\n",
       "       [0.02587038],\n",
       "       [0.02651364],\n",
       "       [0.02669409],\n",
       "       [0.02844954],\n",
       "       [0.02883437],\n",
       "       [0.02890331],\n",
       "       [0.02975655],\n",
       "       [0.02922675],\n",
       "       [0.02954635],\n",
       "       [0.03034875],\n",
       "       [0.03064209],\n",
       "       [0.03100988],\n",
       "       [0.03179792],\n",
       "       [0.03146791],\n",
       "       [0.01668364],\n",
       "       [0.03192374],\n",
       "       [0.03306732],\n",
       "       [0.03223374],\n",
       "       [0.03305358],\n",
       "       [0.03371346],\n",
       "       [0.03352314],\n",
       "       [0.03312689],\n",
       "       [0.0335696 ],\n",
       "       [0.01253423],\n",
       "       [0.01607522],\n",
       "       [0.01536384],\n",
       "       [0.01685837],\n",
       "       [0.01868242],\n",
       "       [0.01926666],\n",
       "       [0.0149425 ],\n",
       "       [0.02025649],\n",
       "       [0.01915017],\n",
       "       [0.0187602 ],\n",
       "       [0.01849771],\n",
       "       [0.02003211],\n",
       "       [0.02004769],\n",
       "       [0.01930052],\n",
       "       [0.02026424],\n",
       "       [0.02242965],\n",
       "       [0.02446568],\n",
       "       [0.02538759],\n",
       "       [0.02240965],\n",
       "       [0.02587456],\n",
       "       [0.02448818],\n",
       "       [0.02753928],\n",
       "       [0.02723917],\n",
       "       [0.0124312 ],\n",
       "       [0.01194987],\n",
       "       [0.01170501],\n",
       "       [0.01183414],\n",
       "       [0.00825351],\n",
       "       [0.01479223],\n",
       "       [0.01320249],\n",
       "       [0.01398125],\n",
       "       [0.01338676],\n",
       "       [0.01384744],\n",
       "       [0.01609713],\n",
       "       [0.00900498],\n",
       "       [0.01514944],\n",
       "       [0.01643184],\n",
       "       [0.01449841],\n",
       "       [0.01648235],\n",
       "       [0.01763058],\n",
       "       [0.01932922],\n",
       "       [0.01716191],\n",
       "       [0.02020118],\n",
       "       [0.02130222],\n",
       "       [0.02112573],\n",
       "       [0.0178971 ],\n",
       "       [0.02208433],\n",
       "       [0.01964495],\n",
       "       [0.02308539],\n",
       "       [0.02399138],\n",
       "       [0.0241307 ],\n",
       "       [0.02467045],\n",
       "       [0.02522203],\n",
       "       [0.02463984],\n",
       "       [0.0263615 ],\n",
       "       [0.02694988],\n",
       "       [0.02755097],\n",
       "       [0.0281651 ],\n",
       "       [0.02879253],\n",
       "       [0.02943346],\n",
       "       [0.02998772],\n",
       "       [0.03040212],\n",
       "       [0.03082198],\n",
       "       [0.03124753],\n",
       "       [0.0316788 ],\n",
       "       [0.01602155],\n",
       "       [0.01985422],\n",
       "       [0.0172103 ],\n",
       "       [0.01810375],\n",
       "       [0.01773319],\n",
       "       [0.01682454],\n",
       "       [0.01766774],\n",
       "       [0.01615974],\n",
       "       [0.01578099],\n",
       "       [0.01754114],\n",
       "       [0.01706663],\n",
       "       [0.01265526],\n",
       "       [0.02188921],\n",
       "       [0.02213445],\n",
       "       [0.02563733],\n",
       "       [0.01762289],\n",
       "       [0.02066901],\n",
       "       [0.02110583],\n",
       "       [0.02460241],\n",
       "       [0.02580768],\n",
       "       [0.02390823],\n",
       "       [0.02537441],\n",
       "       [0.02520669],\n",
       "       [0.02497   ],\n",
       "       [0.02185181],\n",
       "       [0.02477846],\n",
       "       [0.02537388],\n",
       "       [0.02885887],\n",
       "       [0.02979663],\n",
       "       [0.0311929 ],\n",
       "       [0.03155059],\n",
       "       [0.03173399],\n",
       "       [0.02387258],\n",
       "       [0.03324226],\n",
       "       [0.03338751],\n",
       "       [0.03208578],\n",
       "       [0.03126907],\n",
       "       [0.02910653],\n",
       "       [0.03163582],\n",
       "       [0.03318304],\n",
       "       [0.0314208 ],\n",
       "       [0.03179577],\n",
       "       [0.03197238],\n",
       "       [0.03133473],\n",
       "       [0.03175166],\n",
       "       [0.03216043],\n",
       "       [0.03247845],\n",
       "       [0.03213432],\n",
       "       [0.03291076],\n",
       "       [0.03298917],\n",
       "       [0.01250196],\n",
       "       [0.01377976],\n",
       "       [0.01266813],\n",
       "       [0.01618373],\n",
       "       [0.01437598],\n",
       "       [0.01507837],\n",
       "       [0.0140675 ],\n",
       "       [0.01578176],\n",
       "       [0.01669285],\n",
       "       [0.01679316],\n",
       "       [0.01658726],\n",
       "       [0.01835546],\n",
       "       [0.01950616],\n",
       "       [0.01826844],\n",
       "       [0.01992184],\n",
       "       [0.02040157],\n",
       "       [0.02096179],\n",
       "       [0.02016538],\n",
       "       [0.02067897],\n",
       "       [0.0199686 ],\n",
       "       [0.02000275],\n",
       "       [0.01990691],\n",
       "       [0.02462226],\n",
       "       [0.02234772],\n",
       "       [0.02158892],\n",
       "       [0.02155814],\n",
       "       [0.0222185 ],\n",
       "       [0.02439973],\n",
       "       [0.02450278],\n",
       "       [0.02481332],\n",
       "       [0.02521592],\n",
       "       [0.02448973],\n",
       "       [0.02533823],\n",
       "       [0.02580118],\n",
       "       [0.0129399 ],\n",
       "       [0.01604685],\n",
       "       [0.01575068],\n",
       "       [0.01749212],\n",
       "       [0.01468256],\n",
       "       [0.01476288],\n",
       "       [0.02034906],\n",
       "       [0.0212746 ],\n",
       "       [0.02101615],\n",
       "       [0.02206501],\n",
       "       [0.02907428],\n",
       "       [0.02371109],\n",
       "       [0.020199  ],\n",
       "       [0.02152917],\n",
       "       [0.0242905 ],\n",
       "       [0.02742228],\n",
       "       [0.02325541],\n",
       "       [0.02235809],\n",
       "       [0.0227761 ],\n",
       "       [0.02324373],\n",
       "       [0.02402157],\n",
       "       [0.02353823],\n",
       "       [0.02436969],\n",
       "       [0.02404192],\n",
       "       [0.02342659],\n",
       "       [0.02398789],\n",
       "       [0.02588961],\n",
       "       [0.02603552],\n",
       "       [0.03370881],\n",
       "       [0.03200248],\n",
       "       [0.02350488],\n",
       "       [0.03048873],\n",
       "       [0.03036448],\n",
       "       [0.02881908],\n",
       "       [0.03362244],\n",
       "       [0.0324569 ],\n",
       "       [0.03331935],\n",
       "       [0.03545812],\n",
       "       [0.03171131],\n",
       "       [0.03647736],\n",
       "       [0.03647816],\n",
       "       [0.03632352],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03477228],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.036369  ],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03337017],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.00647381],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.01213047],\n",
       "       [0.01361585],\n",
       "       [0.01246202],\n",
       "       [0.01245424],\n",
       "       [0.01281384],\n",
       "       [0.01370665],\n",
       "       [0.01591381],\n",
       "       [0.01535407],\n",
       "       [0.01660636],\n",
       "       [0.01588365],\n",
       "       [0.01726353],\n",
       "       [0.0174135 ],\n",
       "       [0.01696718],\n",
       "       [0.01757285],\n",
       "       [0.01732036],\n",
       "       [0.01826105],\n",
       "       [0.02148071],\n",
       "       [0.01154453],\n",
       "       [0.01170668],\n",
       "       [0.01236022],\n",
       "       [0.01308551],\n",
       "       [0.0142512 ],\n",
       "       [0.0156686 ],\n",
       "       [0.01560593],\n",
       "       [0.01350704],\n",
       "       [0.01546621],\n",
       "       [0.01357761],\n",
       "       [0.01417765],\n",
       "       [0.01481086],\n",
       "       [0.01770195],\n",
       "       [0.0160543 ],\n",
       "       [0.01576486],\n",
       "       [0.01697284],\n",
       "       [0.01654536],\n",
       "       [0.02048022],\n",
       "       [0.02025899],\n",
       "       [0.02013573],\n",
       "       [0.02189925],\n",
       "       [0.02295923],\n",
       "       [0.02305865],\n",
       "       [0.02418989],\n",
       "       [0.02407232],\n",
       "       [0.02373034],\n",
       "       [0.02339277],\n",
       "       [0.02432999],\n",
       "       [0.0158737 ],\n",
       "       [0.01672333],\n",
       "       [0.01670384],\n",
       "       [0.01718882],\n",
       "       [0.01808015],\n",
       "       [0.01897711],\n",
       "       [0.01459518],\n",
       "       [0.01497638],\n",
       "       [0.01959503],\n",
       "       [0.01566038],\n",
       "       [0.01961327],\n",
       "       [0.01637515],\n",
       "       [0.0199371 ],\n",
       "       [0.01712185],\n",
       "       [0.02617952],\n",
       "       [0.01583818],\n",
       "       [0.01564935],\n",
       "       [0.01653993],\n",
       "       [0.01737612],\n",
       "       [0.01668191],\n",
       "       [0.01785898],\n",
       "       [0.01724178],\n",
       "       [0.01897874],\n",
       "       [0.01924852],\n",
       "       [0.01891154],\n",
       "       [0.01833367],\n",
       "       [0.0197067 ],\n",
       "       [0.01994297],\n",
       "       [0.02135065],\n",
       "       [0.01382694],\n",
       "       [0.02199352],\n",
       "       [0.02116796],\n",
       "       [0.02193809],\n",
       "       [0.02077904],\n",
       "       [0.02296203],\n",
       "       [0.02228776],\n",
       "       [0.0231584 ],\n",
       "       [0.02383456],\n",
       "       [0.02432388],\n",
       "       [0.02709559],\n",
       "       [0.02469593],\n",
       "       [0.02401227],\n",
       "       [0.02851266],\n",
       "       [0.02917698],\n",
       "       [0.02931058],\n",
       "       [0.02587628],\n",
       "       [0.02775761],\n",
       "       [0.02998486],\n",
       "       [0.01322165],\n",
       "       [0.01530561],\n",
       "       [0.01472536],\n",
       "       [0.01430681],\n",
       "       [0.01545176],\n",
       "       [0.01651174],\n",
       "       [0.01666057],\n",
       "       [0.01682702],\n",
       "       [0.01940703],\n",
       "       [0.02094814],\n",
       "       [0.01996687],\n",
       "       [0.01945439],\n",
       "       [0.01847377],\n",
       "       [0.02121663],\n",
       "       [0.02007705],\n",
       "       [0.01877594],\n",
       "       [0.01808277],\n",
       "       [0.01910019],\n",
       "       [0.02106106],\n",
       "       [0.02124122],\n",
       "       [0.02252543],\n",
       "       [0.02222592],\n",
       "       [0.02399844],\n",
       "       [0.0247505 ],\n",
       "       [0.02552038],\n",
       "       [0.0281513 ],\n",
       "       [0.02652448],\n",
       "       [0.02608672],\n",
       "       [0.02621979],\n",
       "       [0.0283097 ],\n",
       "       [0.02909282],\n",
       "       [0.03044799],\n",
       "       [0.03164625],\n",
       "       [0.02941048],\n",
       "       [0.03186956],\n",
       "       [0.03054699],\n",
       "       [0.0159888 ],\n",
       "       [0.0143854 ],\n",
       "       [0.01546469],\n",
       "       [0.01608863],\n",
       "       [0.01776367],\n",
       "       [0.01689044],\n",
       "       [0.01880586],\n",
       "       [0.01683673],\n",
       "       [0.01834017],\n",
       "       [0.01435333],\n",
       "       [0.01264244],\n",
       "       [0.01420838],\n",
       "       [0.01300254],\n",
       "       [0.01422676],\n",
       "       [0.01745713],\n",
       "       [0.0188368 ],\n",
       "       [0.01581013],\n",
       "       [0.01663062],\n",
       "       [0.01748881],\n",
       "       [0.01792556],\n",
       "       [0.02072656],\n",
       "       [0.01752493],\n",
       "       [0.01261204],\n",
       "       [0.01256576],\n",
       "       [0.01292321],\n",
       "       [0.01426864],\n",
       "       [0.01345977],\n",
       "       [0.01494753],\n",
       "       [0.01456639],\n",
       "       [0.01453426],\n",
       "       [0.01831719],\n",
       "       [0.01565   ],\n",
       "       [0.01552632],\n",
       "       [0.01646182],\n",
       "       [0.01666552],\n",
       "       [0.01756707],\n",
       "       [0.01657256],\n",
       "       [0.01623499],\n",
       "       [0.01775566],\n",
       "       [0.01559338],\n",
       "       [0.01890355],\n",
       "       [0.01749733],\n",
       "       [0.01716739],\n",
       "       [0.02098456],\n",
       "       [0.02075416],\n",
       "       [0.022383  ],\n",
       "       [0.01915175],\n",
       "       [0.02129203],\n",
       "       [0.02406061],\n",
       "       [0.02428392],\n",
       "       [0.02436739],\n",
       "       [0.02188796],\n",
       "       [0.0246712 ],\n",
       "       [0.01284739],\n",
       "       [0.01455307],\n",
       "       [0.01698831],\n",
       "       [0.0148226 ],\n",
       "       [0.01492852],\n",
       "       [0.01531425],\n",
       "       [0.01520228],\n",
       "       [0.00943279],\n",
       "       [0.01546723],\n",
       "       [0.01687118],\n",
       "       [0.01736361],\n",
       "       [0.01830849],\n",
       "       [0.01972544],\n",
       "       [0.01969433],\n",
       "       [0.01967028],\n",
       "       [0.0190773 ],\n",
       "       [0.01842585],\n",
       "       [0.01919106],\n",
       "       [0.02016115],\n",
       "       [0.02183485],\n",
       "       [0.02161223],\n",
       "       [0.02123269],\n",
       "       [0.02529511],\n",
       "       [0.02376682],\n",
       "       [0.02169001],\n",
       "       [0.02311859],\n",
       "       [0.00872788],\n",
       "       [0.01848799],\n",
       "       [0.0265314 ],\n",
       "       [0.02880049],\n",
       "       [0.02625021],\n",
       "       [0.02493909],\n",
       "       [0.02467096],\n",
       "       [0.0243727 ],\n",
       "       [0.02599573],\n",
       "       [0.02943361],\n",
       "       [0.03026211],\n",
       "       [0.03123826],\n",
       "       [0.03198254],\n",
       "       [0.03122249],\n",
       "       [0.03087452],\n",
       "       [0.03321517],\n",
       "       [0.03342184],\n",
       "       [0.03340414],\n",
       "       [0.03384358],\n",
       "       [0.03365052],\n",
       "       [0.03373787],\n",
       "       [0.03422126],\n",
       "       [0.03441808],\n",
       "       [0.03390372],\n",
       "       [0.0338662 ],\n",
       "       [0.03457105],\n",
       "       [0.03441441],\n",
       "       [0.03573817],\n",
       "       [0.03577101],\n",
       "       [0.01532078],\n",
       "       [0.02778563],\n",
       "       [0.03565207],\n",
       "       [0.03608188],\n",
       "       [0.03597608],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03609365],\n",
       "       [0.03540695],\n",
       "       [0.03654674],\n",
       "       [0.03631127],\n",
       "       [0.03647119],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.0195739 ],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.02207908],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.03654674],\n",
       "       [0.02303159],\n",
       "       [0.03654674],\n",
       "       [0.0129191 ],\n",
       "       [0.01187101],\n",
       "       [0.01377618],\n",
       "       [0.0165731 ],\n",
       "       [0.0140337 ],\n",
       "       [0.00937501],\n",
       "       [0.01368639],\n",
       "       [0.01436433],\n",
       "       [0.01558405],\n",
       "       [0.02045697],\n",
       "       [0.01568043],\n",
       "       [0.01562062],\n",
       "       [0.01584154],\n",
       "       [0.02079162],\n",
       "       [0.01600391],\n",
       "       [0.01616451],\n",
       "       [0.01517421],\n",
       "       [0.02231798],\n",
       "       [0.01589689],\n",
       "       [0.01698625],\n",
       "       [0.0183264 ],\n",
       "       [0.01851732],\n",
       "       [0.02612936],\n",
       "       [0.01614195],\n",
       "       [0.01595932],\n",
       "       [0.01710483],\n",
       "       [0.02609071],\n",
       "       [0.01995966],\n",
       "       [0.01886356],\n",
       "       [0.01896277],\n",
       "       [0.02014223],\n",
       "       [0.03280574],\n",
       "       [0.02965105],\n",
       "       [0.03048575],\n",
       "       [0.02989745],\n",
       "       [0.02497801],\n",
       "       [0.024279  ],\n",
       "       [0.02333987],\n",
       "       [0.02496263],\n",
       "       [0.02345249],\n",
       "       [0.02573001],\n",
       "       [0.02376884],\n",
       "       [0.01117313],\n",
       "       [0.01126251],\n",
       "       [0.01182708],\n",
       "       [0.01143941],\n",
       "       [0.01180324],\n",
       "       [0.01224509],\n",
       "       [0.01268259],\n",
       "       [0.01356634],\n",
       "       [0.01335078],\n",
       "       [0.0150207 ],\n",
       "       [0.01429194],\n",
       "       [0.01353756],\n",
       "       [0.0155282 ],\n",
       "       [0.01323777],\n",
       "       [0.01433226],\n",
       "       [0.0161002 ],\n",
       "       [0.01626718],\n",
       "       [0.01686698],\n",
       "       [0.01825702],\n",
       "       [0.01909027],\n",
       "       [0.01666349],\n",
       "       [0.02099869],\n",
       "       [0.01495034],\n",
       "       [0.02163056],\n",
       "       [0.0212366 ],\n",
       "       [0.02427602],\n",
       "       [0.02309954],\n",
       "       [0.02480692],\n",
       "       [0.02548495],\n",
       "       [0.02361563],\n",
       "       [0.02660587],\n",
       "       [0.02635214],\n",
       "       [0.02398652],\n",
       "       [0.02659419],\n",
       "       [0.02647933],\n",
       "       [0.0287371 ],\n",
       "       [0.02501854],\n",
       "       [0.02782059],\n",
       "       [0.02733648],\n",
       "       [0.02323845],\n",
       "       [0.02713197],\n",
       "       [0.02675739],\n",
       "       [0.03105876],\n",
       "       [0.02847224],\n",
       "       [0.02846599],\n",
       "       [0.02871048],\n",
       "       [0.02575529],\n",
       "       [0.02679393],\n",
       "       [0.02836028],\n",
       "       [0.03019148],\n",
       "       [0.03019646],\n",
       "       [0.02760673],\n",
       "       [0.03227037],\n",
       "       [0.03167424],\n",
       "       [0.03193021],\n",
       "       [0.030047  ],\n",
       "       [0.0323776 ],\n",
       "       [0.03163081],\n",
       "       [0.03303784],\n",
       "       [0.0322971 ],\n",
       "       [0.0335744 ],\n",
       "       [0.03502437],\n",
       "       [0.03152335],\n",
       "       [0.03496194],\n",
       "       [0.01562515],\n",
       "       [0.01513135],\n",
       "       [0.01583859],\n",
       "       [0.01820171],\n",
       "       [0.01561546],\n",
       "       [0.01570037],\n",
       "       [0.01781386],\n",
       "       [0.01887834],\n",
       "       [0.01567432],\n",
       "       [0.01815128],\n",
       "       [0.01936138],\n",
       "       [0.01996028],\n",
       "       [0.02143851],\n",
       "       [0.01958948],\n",
       "       [0.01994276],\n",
       "       [0.01649731],\n",
       "       [0.02066812],\n",
       "       [0.01747662],\n",
       "       [0.02141938],\n",
       "       [0.01900512],\n",
       "       [0.01223037],\n",
       "       [0.02268237],\n",
       "       [0.02348667],\n",
       "       [0.02303913],\n",
       "       [0.02335984],\n",
       "       [0.02200198],\n",
       "       [0.02401435],\n",
       "       [0.02434817],\n",
       "       [0.01422074],\n",
       "       [0.01669183],\n",
       "       [0.01712078],\n",
       "       [0.01726744],\n",
       "       [0.01768595],\n",
       "       [0.01910922],\n",
       "       [0.02004069],\n",
       "       [0.0206424 ],\n",
       "       [0.01996303],\n",
       "       [0.01970735],\n",
       "       [0.02167258],\n",
       "       [0.02074695],\n",
       "       [0.02205724],\n",
       "       [0.02343756],\n",
       "       [0.02378613],\n",
       "       [0.02322009],\n",
       "       [0.02412841],\n",
       "       [0.0232884 ],\n",
       "       [0.02368343],\n",
       "       [0.02449286],\n",
       "       [0.02356213],\n",
       "       [0.02425358],\n",
       "       [0.02382129],\n",
       "       [0.02750486],\n",
       "       [0.02696803],\n",
       "       [0.02549288],\n",
       "       [0.02298936],\n",
       "       [0.02544558],\n",
       "       [0.02742344],\n",
       "       [0.02927721],\n",
       "       [0.03060257],\n",
       "       [0.02926666],\n",
       "       [0.02907112],\n",
       "       [0.02880105],\n",
       "       [0.02813557],\n",
       "       [0.03042829],\n",
       "       [0.02904603],\n",
       "       [0.02965611],\n",
       "       [0.02958238],\n",
       "       [0.03078687],\n",
       "       [0.02932739],\n",
       "       [0.03047946],\n",
       "       [0.02852646],\n",
       "       [0.02908134],\n",
       "       [0.02834845],\n",
       "       [0.01281616],\n",
       "       [0.01310626],\n",
       "       [0.01203468]], dtype=float32)"
      ]
     },
     "execution_count": 190,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_pred[:1000]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 213,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_pred[y_pred>0.036]=1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 214,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_pred[y_pred<0.036]=0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 216,
   "metadata": {},
   "outputs": [],
   "source": [
    "c=0\n",
    "for i in range(0,len(y_test)):\n",
    "    if y_test[i]==0 and y_pred[i]==1:\n",
    "        c=c+1\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 217,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "294"
      ]
     },
     "execution_count": 217,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 218,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "323"
      ]
     },
     "execution_count": 218,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(y_pred[y_pred==1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 228,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3104"
      ]
     },
     "execution_count": 228,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(y_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 219,
   "metadata": {},
   "outputs": [],
   "source": [
    "p=len(y_pred[y_pred==1])-c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 220,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "29"
      ]
     },
     "execution_count": 220,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 227,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.24786324786324787"
      ]
     },
     "execution_count": 227,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "p/len(y_test[y_test==1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
